package com.woniu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 
 * @TableName ctf_score_difficulty
 */
@TableName(value ="ctf_score_difficulty")
@Data
public class CtfScoreDifficulty {
    /**
     * 
     */
    @TableId
    private Integer difficultyId;

    /**
     * 
     */
    private String rangeDifficulty;

    /**
     * 
     */
    private Double scoreValue;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CtfScoreDifficulty other = (CtfScoreDifficulty) that;
        return (this.getDifficultyId() == null ? other.getDifficultyId() == null : this.getDifficultyId().equals(other.getDifficultyId()))
            && (this.getRangeDifficulty() == null ? other.getRangeDifficulty() == null : this.getRangeDifficulty().equals(other.getRangeDifficulty()))
            && (this.getScoreValue() == null ? other.getScoreValue() == null : this.getScoreValue().equals(other.getScoreValue()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDifficultyId() == null) ? 0 : getDifficultyId().hashCode());
        result = prime * result + ((getRangeDifficulty() == null) ? 0 : getRangeDifficulty().hashCode());
        result = prime * result + ((getScoreValue() == null) ? 0 : getScoreValue().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", difficultyId=").append(difficultyId);
        sb.append(", rangeDifficulty=").append(rangeDifficulty);
        sb.append(", scoreValue=").append(scoreValue);
        sb.append("]");
        return sb.toString();
    }
}